<template>
  <div class='box'>
    <div class="box1">
      <div class="box2"></div>
      <div class="box3"></div>
    </div>
    <div class="box4"></div>
  </div>
</template>

<script>
export default {
  name: 'index',
};
</script>

<script setup>
</script>

<style lang='scss' scoped>
.box{
  position: relative;
  .box1,.box2,.box3,.box4{
    position: absolute;
    left: 0;
    top: 0;
    width: 100px;
    height: 100px;
    background: #000;
    z-index: 1;
  }
  .box2{
    z-index: -10;
    width: 90px;
    height: 90px;
    background: red;
  }
  .box3{
    z-index: -1;
    width: 80px;
    height: 80px;
    background: green;
  }
  .box4{
    z-index: 0;
    width: 70px;
    height: 70px;
    background: yellow;
  }
}
</style>